package com.example.AIstudy.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
public class Exercise implements Serializable {
    //自增的主键
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    //题目的类别
    @TableField("category")
    private String category;

    //题目的问题
    @TableField("problem")
    private String problem;

    //题目的答案
    @TableField("answer")
    private String answer;

    //这个题目的同道题（相当于子题）
    @TableField("sonProID")
    private String sonProID;

    //这个题目是不是单独的题目
    @TableField("isSingle")
    private boolean isSingle;

    //这个题目是不是单独的题目
    @TableField("score")
    private int score;
    @TableField(exist = false)
    private int stuScore;
    //选择题的选项个数
    @TableField("choiceNum")
    private int choiceNum;
//
//    //创建题目的教师ID
//    @TableField("teacherID")
//    private int teacherID;
//
//    //是否公开
//    @TableField("isPublic")
//    private boolean isPublic;
    @TableField(exist = false)
    public Integer stuID;
    //难度等级
    @TableField("level")
    private int level;

    @TableField("field")
    private String field;

    //难度等级
    @TableField(value="knowledgeIDs")
    private String knowledgeIDs;

    //选项1
    @TableField("choice1")
    private String choice1;
    //选项2
    @TableField("choice2")
    private String choice2;
    //选项3
    @TableField("choice3")
    private String choice3;
    //选项4
    @TableField("choice4")
    private String choice4;

    //题干内容
    @TableField("content")
    private String content;

    @TableField(exist = false)
    private String stuAnswer;

    @TableField(exist = false)
    private String aiComment;

    @TableField(exist = false)
    private String falseReason;

    @TableField(exist = false)
    private String userComment;

    //封装子习题
    @TableField(exist = false)
    List<Exercise>sonExercise;

    @TableField(exist = false)
    List<CuoTiJi>cuoTiList;

    @TableField(exist = false)
    boolean isExisted=true;

    @TableField("esID")
    private String esID;

    //作文评语对应的id
    @TableField(exist = false)
    public Integer compCommentID=null;

    //翻译评语对应的id
    @TableField(exist = false)
    public Integer transCommentID=null;

    //翻译题对应的得分详情
    @TableField(exist = false)
    public TranslateDetail translateDetail;

    //作文对应的得分详情
    @TableField(exist = false)
    public CompositionDetail compositionDetail;

    //题目是否正确
    @TableField(exist = false)
    public boolean isRight;
}
